package org.stvd.repository.workflow.impl;

import java.util.List;

import org.springframework.stereotype.Repository;
import org.stvd.core.dto.QueryResult;
import org.stvd.entities.workflow.WfLogs;
import org.stvd.repository.base.impl.BaseDaoImpl;
import org.stvd.repository.workflow.WfLogsDao;

@Repository("WfLogsDao")
public class WfLogsDaoImpl extends BaseDaoImpl<WfLogs> implements WfLogsDao {

    public QueryResult<WfLogs> getQueryResult(int start, int limit) {
        return super.getQueryResultByHQL(start, limit, "from WfLogs");
    }

    public List<WfLogs> findByProcInstId(String procInstId) {
        return findByHQL("from WfLogs where procInstId = ?0 order by operateTime asc", procInstId);
    }
}
